<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>preload prefetch</title>
    <!-- <link rel="stylesheet" href="./css/pindex1.css">
    <link rel="stylesheet" href="./css/pindex2.css"> -->

    <link rel="preload" href="./css/pindex2.css" as="style">

    <!-- <script src="./js/pindex1.js"></script>
    <script src="./js/pindex2.js"></script> -->

    <link rel="prefetch" as="script" href="./js/pindex1.js">
    <link rel="preload" as="script" href="./js/pindex2.js">
</head>
<body>
    <div class="wrap">
        大伟聊前端
    </div>
</body>
</html>



















<!-- 


使用 preload 会将资源优先级q设置为 Highest，
使用 prefetch 会将资源优先级设置为 Lowest，
Lowest 资源将会在网络空闲时才开始加载。

preload 优先级高于 prefetch；
 -->